package com.holyant.goods.enums;

public enum QuoteCostPriceEnum {
    YES(1, "是"), NO(0, "否");

    private final Integer code;
    private final String name;

    QuoteCostPriceEnum(Integer code, String name) {
        this.code = code;
        this.name = name;
    }

    public Integer getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

    public static String getNameByCode(Integer code) {
        for (QuoteCostPriceEnum item : QuoteCostPriceEnum.values()) {
            if (item.getCode().equals(code)) {
                return item.getName();
            }
        }
        return null;
    }

}
